<?php
require('inc/MYSQL_Connection.php');
$id=!empty($_POST['id']) ? trim($_POST['id']) : null;
if($id!=null){
	if(mysqli_connect_errno()){
		echo (json_encode('数据库连接失败'));
	}else{
		$db->query("set names utf8"); 
		$query="delete from keywords where ID=$id";
		$result=$db->query($query);	
		if($result)
			echo (json_encode('删除成功！'));
		else
			echo (json_encode('删除失败！'));
		$db->close();
	}
}else
	echo (json_encode('id传递失败！'));
?>